
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <meta name="viewport"content="width=device-width,inital-scale=1,maxmum-scale=1,minmum-scale=1,nser-scalable=no" />
<html>

<head>
	<script src="study/js/jquery/2.0.0/jquery.min.js"></script>
	<link href="study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
	<script src="study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
	<link rel="stylesheet" type="text/css" href="study/css/styles.css" />
<script>
	function formatMoney(num) {
		num = num.toString().replace(/\$|\,/g, '');
		if(isNaN(num))
			num = "0";
		sign = (num == (num = Math.abs(num)));
		num = Math.floor(num * 100 + 0.50000000001);
		cents = num % 100;
		num = Math.floor(num / 100).toString();
		if(cents < 10)
			cents = "0" + cents;
		for(var i = 0; i < Math.floor((num.length - (1 + i)) / 3); i++)
			num = num.substring(0, num.length - (4 * i + 3)) + ',' +
			num.substring(num.length - (4 * i + 3));
		return(((sign) ? '' : '-') + num + '.' + cents);
	}

	function checkEmpty(id, name) {
		var value = $("#" + id).val();
		if(value.length == 0) {

			$("#" + id)[0].focus();
			return false;
		}
		return true;
	}

	$(function() {

		$("a.productDetailTopReviewLink").click(function() {
			$("div.productReviewDiv").show();
			$("div.productDetailDiv").hide();
		});
		$("a.productReviewTopPartSelectedLink").click(function() {
			$("div.productReviewDiv").hide();
			$("div.productDetailDiv").show();
		});

		$("span.leaveMessageTextareaSpan").hide();
		$("img.leaveMessageImg").click(function() {

			$(this).hide();
			$("span.leaveMessageTextareaSpan").show();
			$("div.orderItemSumDiv").css("height", "100px");
		});

	
	});
</script>
</head>

<body>

	<nav class="top ">
		<a href="#nowhere">
			<span style="color:#C40000;margin:0px" class=" glyphicon glyphicon glyphicon-home redColor"></span> 天猫首页
		</a>

		<span>欢迎来到汇书购</span>

		<a href="#nowhere">tmalltest</a>
		<a href="#nowhere">退出</a>

		<span class="pull-right">
			<a href="#nowhere">我的订单</a>
			<a href="#nowhere">
			<span style="color:#C40000;margin:0px" class=" glyphicon glyphicon-shopping-cart redColor"></span> 购物车
		<strong>5</strong>件</a>
		</span>
	</nav>
	<div>
		<a href="#nowhere">
			<img id="simpleLogo" class="simpleLogo" src="">
		</a>

		<form method="post">
			<div class="simpleSearchDiv pull-right">
				<input type="text" placeholder="校花的贴身高手" name="keyword">
				<button class="searchButton" type="button">搜书</button>
				<div class="searchBelow">
					<span>
						<a href="#nowhere">西游记</a>								
							<span>|</span>
					</span>
					<span>
						<a href="#nowhere">	兵王</a>			
							<span>|</span>
					</span>
					<span>
						<a href="#nowhere">水浒传</a>									
							<span>|</span>
					</span>
					<span>
						<a href="#nowhere">兵王</a>	
					</span>
				</div>
			</div>
		</form>
	<div style="clear:both"></div>
</div>

<script>
$(function(){
	
	$(".registerForm").submit(function(){
		if(0==$("#name").val().length){
			$("span.errorMessage").html("请输入用户名");
			$("div.registerErrorMessageDiv").css("visibility","visible");			
			return false;
		}		
		if(0==$("#password").val().length){
			$("span.errorMessage").html("请输入密码");
			$("div.registerErrorMessageDiv").css("visibility","visible");			
			return false;
		}		
		if(0==$("#repeatpassword").val().length){
			$("span.errorMessage").html("请输入重复密码");
			$("div.registerErrorMessageDiv").css("visibility","visible");			
			return false;
		}		
		if($("#password").val() !=$("#repeatpassword").val()){
			$("span.errorMessage").html("重复密码不一致");
			$("div.registerErrorMessageDiv").css("visibility","visible");			
			return false;
		}		

		return true;
	});
})
</script>

<form method="post"  class="registerForm">

<div class="registerDiv">
	<div class="registerErrorMessageDiv">
		<div class="alert alert-danger" role="alert">
		  <button type="button" class="close" data-dismiss="alert" aria-label="Close"></button>
		  	<span class="errorMessage"></span>
		</div>		
	</div>

	<table class="registerTable" align="center">
		<tr>
			<td  class="registerTip registerTableLeftTD">设置会员名</td>
			<td></td>
		</tr>
		<tr>
			<td class="registerTableLeftTD">登陆名</td>
			<td  class="registerTableRightTD"><input id="name" name="name" placeholder="会员名一旦设置成功，无法修改" > </td>
		</tr>
		<tr>
			<td  class="registerTip registerTableLeftTD">设置登陆密码</td>
			<td  class="registerTableRightTD">登陆时验证，保护账号信息</td>
		</tr>		
		<tr>
			<td class="registerTableLeftTD">登陆密码</td>
			<td class="registerTableRightTD"><input id="password" name="password" type="password"  placeholder="设置你的登陆密码" > </td>
		</tr>
		<tr>
			<td class="registerTableLeftTD">密码确认</td>
			<td class="registerTableRightTD"><input id="repeatpassword" type="password"   placeholder="请再次输入你的密码" > </td>
		</tr>
				
		<tr>
			<td colspan="2" class="registerButtonTD">
				<a href="#nowhere"><button>提   交</button></a>
			</td>
		</tr>				
	</table>
</div>
</form>
</div>
<div id="footer"  class="footer" style="display: block;">
    <div id="footer_ensure" class="footer_ensure">
            <a href="#nowhere">
            	<a href="#nowhere"> <img src="img/imgs/ensure.png">
            </a>
    </div>   
</div>
</body>
</html>

